.class public Lrexsee/ebook/Page;
.super Ljava/lang/Object;
.source "Page.java"


# instance fields
.field index:I

.field indexTitle:Ljava/lang/String;

.field inheriteTitle:Ljava/lang/String;

.field private final mBackground:Landroid/graphics/drawable/Drawable;

.field private mContentHeight:I

.field private final mFactory:Lrexsee/ebook/PageFactory;

.field private final mFooter:Ljava/lang/String;

.field private final mFooterLine:Z

.field private final mFooterPaint:Landroid/graphics/Paint;

.field private final mFooterStyle:Lrexsee/core/style/StyleSheet;

.field private final mHeader:Ljava/lang/String;

.field private final mHeaderLine:Z

.field private final mHeaderPaint:Landroid/graphics/Paint;

.field private final mHeaderStyle:Lrexsee/core/style/StyleSheet;

.field private final mHeight:I

.field private final mLines:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lrexsee/ebook/LineInterface;",
            ">;"
        }
    .end annotation
.end field

.field private final mRect:Landroid/graphics/Rect;

.field private mText:Ljava/lang/String;

.field private final mVerticalAlign:Ljava/lang/String;

.field private final mWidth:I


# direct methods
.method public constructor <init>(Lrexsee/ebook/PageFactory;Ljava/lang/String;Landroid/graphics/Rect;Landroid/graphics/drawable/Drawable;Lrexsee/core/style/StyleSheet;Lrexsee/core/style/StyleSheet;)V
    .locals 5
    .param p1, "factory"    # Lrexsee/ebook/PageFactory;
    .param p2, "verticalAlign"    # Ljava/lang/String;
    .param p3, "rect"    # Landroid/graphics/Rect;
    .param p4, "bg"    # Landroid/graphics/drawable/Drawable;
    .param p5, "headerStyle"    # Lrexsee/core/style/StyleSheet;
    .param p6, "footerStyle"    # Lrexsee/core/style/StyleSheet;

    .prologue
    const/4 v3, 0x0

    const/4 v2, 0x0

    const-string v4, "true"

    .line 42
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 32
    iput v3, p0, Lrexsee/ebook/Page;->mContentHeight:I

    .line 33
    iput-object v2, p0, Lrexsee/ebook/Page;->indexTitle:Ljava/lang/String;

    .line 34
    iput-object v2, p0, Lrexsee/ebook/Page;->inheriteTitle:Ljava/lang/String;

    .line 35
    iput v3, p0, Lrexsee/ebook/Page;->index:I

    .line 37
    const-string v0, ""

    iput-object v0, p0, Lrexsee/ebook/Page;->mText:Ljava/lang/String;

    .line 43
    iput-object p1, p0, Lrexsee/ebook/Page;->mFactory:Lrexsee/ebook/PageFactory;

    .line 44
    iget v0, p1, Lrexsee/ebook/PageFactory;->mWidth:I

    iput v0, p0, Lrexsee/ebook/Page;->mWidth:I

    .line 45
    iget v0, p1, Lrexsee/ebook/PageFactory;->mHeight:I

    iput v0, p0, Lrexsee/ebook/Page;->mHeight:I

    .line 46
    iput-object p2, p0, Lrexsee/ebook/Page;->mVerticalAlign:Ljava/lang/String;

    .line 47
    iput-object p3, p0, Lrexsee/ebook/Page;->mRect:Landroid/graphics/Rect;

    .line 48
    iput-object p4, p0, Lrexsee/ebook/Page;->mBackground:Landroid/graphics/drawable/Drawable;

    .line 49
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lrexsee/ebook/Page;->mLines:Ljava/util/ArrayList;

    .line 51
    iput-object p5, p0, Lrexsee/ebook/Page;->mHeaderStyle:Lrexsee/core/style/StyleSheet;

    .line 52
    if-eqz p5, :cond_0

    .line 53
    iget-object v0, p5, Lrexsee/core/style/StyleSheet;->label:Ljava/lang/String;

    iput-object v0, p0, Lrexsee/ebook/Page;->mHeader:Ljava/lang/String;

    .line 54
    iget-object v0, p5, Lrexsee/core/style/StyleSheet;->horizontal_line:Ljava/lang/String;

    const-string v1, "true"

    invoke-virtual {v0, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    iput-boolean v0, p0, Lrexsee/ebook/Page;->mHeaderLine:Z

    .line 55
    invoke-static {p5}, Lrexsee/ebook/PageFactory;->getPaint(Lrexsee/core/style/StyleSheet;)Landroid/graphics/Paint;

    move-result-object v0

    iput-object v0, p0, Lrexsee/ebook/Page;->mHeaderPaint:Landroid/graphics/Paint;

    .line 61
    :goto_0
    iput-object p6, p0, Lrexsee/ebook/Page;->mFooterStyle:Lrexsee/core/style/StyleSheet;

    .line 62
    if-eqz p6, :cond_1

    .line 63
    iget-object v0, p6, Lrexsee/core/style/StyleSheet;->label:Ljava/lang/String;

    iput-object v0, p0, Lrexsee/ebook/Page;->mFooter:Ljava/lang/String;

    .line 64
    iget-object v0, p6, Lrexsee/core/style/StyleSheet;->horizontal_line:Ljava/lang/String;

    const-string v1, "true"

    invoke-virtual {v0, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    iput-boolean v0, p0, Lrexsee/ebook/Page;->mFooterLine:Z

    .line 65
    invoke-static {p6}, Lrexsee/ebook/PageFactory;->getPaint(Lrexsee/core/style/StyleSheet;)Landroid/graphics/Paint;

    move-result-object v0

    iput-object v0, p0, Lrexsee/ebook/Page;->mFooterPaint:Landroid/graphics/Paint;

    .line 71
    :goto_1
    return-void

    .line 57
    :cond_0
    iput-object v2, p0, Lrexsee/ebook/Page;->mHeader:Ljava/lang/String;

    .line 58
    iput-boolean v3, p0, Lrexsee/ebook/Page;->mHeaderLine:Z

    .line 59
    iput-object v2, p0, Lrexsee/ebook/Page;->mHeaderPaint:Landroid/graphics/Paint;

    goto :goto_0

    .line 67
    :cond_1
    iput-object v2, p0, Lrexsee/ebook/Page;->mFooter:Ljava/lang/String;

    .line 68
    iput-boolean v3, p0, Lrexsee/ebook/Page;->mFooterLine:Z

    .line 69
    iput-object v2, p0, Lrexsee/ebook/Page;->mFooterPaint:Landroid/graphics/Paint;

    goto :goto_1
.end method

.method public constructor <init>(Lrexsee/ebook/PageFactory;Lrexsee/ebook/PageBreakLine;)V
    .locals 7
    .param p1, "factory"    # Lrexsee/ebook/PageFactory;
    .param p2, "line"    # Lrexsee/ebook/PageBreakLine;

    .prologue
    .line 40
    iget-object v2, p2, Lrexsee/ebook/PageBreakLine;->verticalAlign:Ljava/lang/String;

    iget-object v3, p2, Lrexsee/ebook/PageBreakLine;->rect:Landroid/graphics/Rect;

    iget-object v4, p2, Lrexsee/ebook/PageBreakLine;->background:Landroid/graphics/drawable/Drawable;

    iget-object v5, p2, Lrexsee/ebook/PageBreakLine;->headerStyle:Lrexsee/core/style/StyleSheet;

    iget-object v6, p2, Lrexsee/ebook/PageBreakLine;->footerStyle:Lrexsee/core/style/StyleSheet;

    move-object v0, p0

    move-object v1, p1

    invoke-direct/range {v0 .. v6}, Lrexsee/ebook/Page;-><init>(Lrexsee/ebook/PageFactory;Ljava/lang/String;Landroid/graphics/Rect;Landroid/graphics/drawable/Drawable;Lrexsee/core/style/StyleSheet;Lrexsee/core/style/StyleSheet;)V

    .line 41
    return-void
.end method


# virtual methods
.method public add(Lrexsee/ebook/LineInterface;)V
    .locals 2
    .param p1, "line"    # Lrexsee/ebook/LineInterface;

    .prologue
    .line 83
    iget-object v0, p0, Lrexsee/ebook/Page;->mLines:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 84
    iget v0, p0, Lrexsee/ebook/Page;->mContentHeight:I

    invoke-interface {p1}, Lrexsee/ebook/LineInterface;->getHeight()I

    move-result v1

    add-int/2addr v0, v1

    iput v0, p0, Lrexsee/ebook/Page;->mContentHeight:I

    .line 85
    invoke-interface {p1}, Lrexsee/ebook/LineInterface;->getText()Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lrexsee/ebook/Page;->mText:Ljava/lang/String;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    invoke-direct {v1, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-interface {p1}, Lrexsee/ebook/LineInterface;->getText()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Landroid/text/Html;->fromHtml(Ljava/lang/String;)Landroid/text/Spanned;

    move-result-object v0

    invoke-interface {v0}, Landroid/text/Spanned;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lrexsee/ebook/Page;->mText:Ljava/lang/String;

    .line 86
    :cond_0
    return-void
.end method

.method public canAdd(Lrexsee/ebook/LineInterface;)Z
    .locals 2
    .param p1, "newLine"    # Lrexsee/ebook/LineInterface;

    .prologue
    .line 80
    invoke-virtual {p0}, Lrexsee/ebook/Page;->getContentHeight()I

    move-result v0

    invoke-interface {p1}, Lrexsee/ebook/LineInterface;->getHeight()I

    move-result v1

    add-int/2addr v0, v1

    invoke-virtual {p0}, Lrexsee/ebook/Page;->getRect()Landroid/graphics/Rect;

    move-result-object v1

    invoke-virtual {v1}, Landroid/graphics/Rect;->height()I

    move-result v1

    if-ge v0, v1, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public bridge synthetic clone()Ljava/lang/Object;
    .locals 1
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/CloneNotSupportedException;
        }
    .end annotation

    .prologue
    .line 1
    invoke-virtual {p0}, Lrexsee/ebook/Page;->clone()Lrexsee/ebook/Page;

    move-result-object v0

    return-object v0
.end method

.method public clone()Lrexsee/ebook/Page;
    .locals 7

    .prologue
    .line 74
    new-instance v0, Lrexsee/ebook/Page;

    iget-object v1, p0, Lrexsee/ebook/Page;->mFactory:Lrexsee/ebook/PageFactory;

    iget-object v2, p0, Lrexsee/ebook/Page;->mVerticalAlign:Ljava/lang/String;

    iget-object v3, p0, Lrexsee/ebook/Page;->mRect:Landroid/graphics/Rect;

    iget-object v4, p0, Lrexsee/ebook/Page;->mBackground:Landroid/graphics/drawable/Drawable;

    iget-object v5, p0, Lrexsee/ebook/Page;->mHeaderStyle:Lrexsee/core/style/StyleSheet;

    iget-object v6, p0, Lrexsee/ebook/Page;->mFooterStyle:Lrexsee/core/style/StyleSheet;

    invoke-direct/range {v0 .. v6}, Lrexsee/ebook/Page;-><init>(Lrexsee/ebook/PageFactory;Ljava/lang/String;Landroid/graphics/Rect;Landroid/graphics/drawable/Drawable;Lrexsee/core/style/StyleSheet;Lrexsee/core/style/StyleSheet;)V

    .line 75
    .local v0, "newPage":Lrexsee/ebook/Page;
    iget-object v1, p0, Lrexsee/ebook/Page;->inheriteTitle:Ljava/lang/String;

    iput-object v1, v0, Lrexsee/ebook/Page;->inheriteTitle:Ljava/lang/String;

    .line 76
    return-object v0
.end method

.method public containsText(Ljava/lang/String;)Z
    .locals 1
    .param p1, "text"    # Ljava/lang/String;

    .prologue
    .line 153
    iget-object v0, p0, Lrexsee/ebook/Page;->indexTitle:Ljava/lang/String;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lrexsee/ebook/Page;->indexTitle:Ljava/lang/String;

    invoke-virtual {v0, p1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_1

    :cond_0
    iget-object v0, p0, Lrexsee/ebook/Page;->mText:Ljava/lang/String;

    invoke-virtual {v0, p1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_1

    const/4 v0, 0x0

    :goto_0
    return v0

    :cond_1
    const/4 v0, 0x1

    goto :goto_0
.end method

.method public draw()Landroid/graphics/Bitmap;
    .locals 22

    .prologue
    .line 98
    :try_start_0
    invoke-virtual/range {p0 .. p0}, Lrexsee/ebook/Page;->isNull()Z

    move-result v6

    if-eqz v6, :cond_0

    const/4 v6, 0x0

    .line 148
    :goto_0
    return-object v6

    .line 99
    :cond_0
    move-object/from16 v0, p0

    iget v0, v0, Lrexsee/ebook/Page;->mWidth:I

    move v6, v0

    move-object/from16 v0, p0

    iget v0, v0, Lrexsee/ebook/Page;->mHeight:I

    move v7, v0

    sget-object v8, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

    invoke-static {v6, v7, v8}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;

    move-result-object v11

    .line 100
    .local v11, "bitmap":Landroid/graphics/Bitmap;
    new-instance v5, Landroid/graphics/Canvas;

    invoke-direct {v5, v11}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V

    .line 101
    .local v5, "canvas":Landroid/graphics/Canvas;
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mBackground:Landroid/graphics/drawable/Drawable;

    move-object v6, v0

    if-eqz v6, :cond_1

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mBackground:Landroid/graphics/drawable/Drawable;

    move-object v6, v0

    invoke-virtual {v6, v5}, Landroid/graphics/drawable/Drawable;->draw(Landroid/graphics/Canvas;)V

    .line 103
    :cond_1
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mVerticalAlign:Ljava/lang/String;

    move-object v6, v0

    const-string v7, "middle"

    invoke-virtual {v6, v7}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v6

    if-nez v6, :cond_2

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mVerticalAlign:Ljava/lang/String;

    move-object v6, v0

    const-string v7, "middle"

    invoke-virtual {v6, v7}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v6

    if-eqz v6, :cond_5

    .line 104
    :cond_2
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mRect:Landroid/graphics/Rect;

    move-object v6, v0

    iget v6, v6, Landroid/graphics/Rect;->top:I

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mRect:Landroid/graphics/Rect;

    move-object v7, v0

    invoke-virtual {v7}, Landroid/graphics/Rect;->height()I

    move-result v7

    move-object/from16 v0, p0

    iget v0, v0, Lrexsee/ebook/Page;->mContentHeight:I

    move v8, v0

    sub-int/2addr v7, v8

    div-int/lit8 v7, v7, 0x2

    int-to-float v7, v7

    invoke-static {v7}, Ljava/lang/Math;->round(F)I

    move-result v7

    add-int v21, v6, v7

    .line 110
    .local v21, "y":I
    :goto_1
    const/16 v16, 0x0

    .local v16, "i":I
    :goto_2
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mLines:Ljava/util/ArrayList;

    move-object v6, v0

    invoke-virtual {v6}, Ljava/util/ArrayList;->size()I

    move-result v6

    move/from16 v0, v16

    move v1, v6

    if-lt v0, v1, :cond_7

    .line 116
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mHeaderPaint:Landroid/graphics/Paint;

    move-object v6, v0

    if-eqz v6, :cond_3

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mHeader:Ljava/lang/String;

    move-object v6, v0

    if-eqz v6, :cond_3

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mHeader:Ljava/lang/String;

    move-object v6, v0

    invoke-virtual {v6}, Ljava/lang/String;->length()I

    move-result v6

    if-lez v6, :cond_3

    .line 118
    move-object/from16 v0, p0

    iget-boolean v0, v0, Lrexsee/ebook/Page;->mHeaderLine:Z

    move v6, v0

    if-eqz v6, :cond_8

    .line 119
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mRect:Landroid/graphics/Rect;

    move-object v6, v0

    iget v6, v6, Landroid/graphics/Rect;->left:I

    int-to-float v6, v6

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mRect:Landroid/graphics/Rect;

    move-object v7, v0

    iget v7, v7, Landroid/graphics/Rect;->top:I

    const/16 v8, 0xc

    sub-int/2addr v7, v8

    int-to-float v7, v7

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mRect:Landroid/graphics/Rect;

    move-object v8, v0

    iget v8, v8, Landroid/graphics/Rect;->right:I

    int-to-float v8, v8

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mRect:Landroid/graphics/Rect;

    move-object v9, v0

    iget v9, v9, Landroid/graphics/Rect;->top:I

    const/16 v10, 0xa

    sub-int/2addr v9, v10

    int-to-float v9, v9

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mHeaderPaint:Landroid/graphics/Paint;

    move-object v10, v0

    invoke-virtual/range {v5 .. v10}, Landroid/graphics/Canvas;->drawLine(FFFFLandroid/graphics/Paint;)V

    .line 120
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mRect:Landroid/graphics/Rect;

    move-object v6, v0

    iget v6, v6, Landroid/graphics/Rect;->top:I

    const/16 v7, 0x16

    sub-int v15, v6, v7

    .line 124
    .local v15, "hy":I
    :goto_3
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mHeader:Ljava/lang/String;

    move-object v6, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mRect:Landroid/graphics/Rect;

    move-object v7, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mHeaderPaint:Landroid/graphics/Paint;

    move-object v8, v0

    invoke-static {v7, v8}, Lrexsee/ebook/TextLine;->getOriginX(Landroid/graphics/Rect;Landroid/graphics/Paint;)I

    move-result v7

    int-to-float v7, v7

    int-to-float v8, v15

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mHeaderPaint:Landroid/graphics/Paint;

    move-object v9, v0

    invoke-virtual {v5, v6, v7, v8, v9}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    .line 126
    .end local v15    # "hy":I
    :cond_3
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mFooterPaint:Landroid/graphics/Paint;

    move-object v6, v0

    if-eqz v6, :cond_4

    .line 128
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mFooter:Ljava/lang/String;

    move-object v6, v0

    if-eqz v6, :cond_9

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mFooter:Ljava/lang/String;

    move-object v6, v0

    invoke-virtual {v6}, Ljava/lang/String;->length()I

    move-result v6

    if-lez v6, :cond_9

    .line 129
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mFooter:Ljava/lang/String;

    move-object v13, v0

    .line 135
    .local v13, "footer":Ljava/lang/String;
    :goto_4
    invoke-virtual {v13}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v6

    const-string v7, "hidden"

    invoke-virtual {v6, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-nez v6, :cond_4

    .line 137
    move-object/from16 v0, p0

    iget-boolean v0, v0, Lrexsee/ebook/Page;->mFooterLine:Z

    move v6, v0

    if-eqz v6, :cond_b

    .line 138
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mRect:Landroid/graphics/Rect;

    move-object v6, v0

    iget v6, v6, Landroid/graphics/Rect;->left:I

    int-to-float v6, v6

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mRect:Landroid/graphics/Rect;

    move-object v7, v0

    iget v7, v7, Landroid/graphics/Rect;->bottom:I

    add-int/lit8 v7, v7, 0xa

    int-to-float v7, v7

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mRect:Landroid/graphics/Rect;

    move-object v8, v0

    iget v8, v8, Landroid/graphics/Rect;->right:I

    int-to-float v8, v8

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mRect:Landroid/graphics/Rect;

    move-object v9, v0

    iget v9, v9, Landroid/graphics/Rect;->bottom:I

    add-int/lit8 v9, v9, 0xc

    int-to-float v9, v9

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mFooterPaint:Landroid/graphics/Paint;

    move-object v10, v0

    invoke-virtual/range {v5 .. v10}, Landroid/graphics/Canvas;->drawLine(FFFFLandroid/graphics/Paint;)V

    .line 139
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mRect:Landroid/graphics/Rect;

    move-object v6, v0

    iget v6, v6, Landroid/graphics/Rect;->bottom:I

    add-int/lit8 v6, v6, 0x10

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mFooterPaint:Landroid/graphics/Paint;

    move-object v7, v0

    invoke-virtual {v7}, Landroid/graphics/Paint;->getTextSize()F

    move-result v7

    float-to-int v7, v7

    add-int v14, v6, v7

    .line 143
    .local v14, "fy":I
    :goto_5
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mRect:Landroid/graphics/Rect;

    move-object v6, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mFooterPaint:Landroid/graphics/Paint;

    move-object v7, v0

    invoke-static {v6, v7}, Lrexsee/ebook/TextLine;->getOriginX(Landroid/graphics/Rect;Landroid/graphics/Paint;)I

    move-result v6

    int-to-float v6, v6

    int-to-float v7, v14

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mFooterPaint:Landroid/graphics/Paint;

    move-object v8, v0

    invoke-virtual {v5, v13, v6, v7, v8}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    .end local v13    # "footer":Ljava/lang/String;
    .end local v14    # "fy":I
    :cond_4
    move-object v6, v11

    .line 146
    goto/16 :goto_0

    .line 105
    .end local v16    # "i":I
    .end local v21    # "y":I
    :cond_5
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mVerticalAlign:Ljava/lang/String;

    move-object v6, v0

    const-string v7, "bottom"

    invoke-virtual {v6, v7}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v6

    if-eqz v6, :cond_6

    .line 106
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mRect:Landroid/graphics/Rect;

    move-object v6, v0

    iget v6, v6, Landroid/graphics/Rect;->bottom:I

    move-object/from16 v0, p0

    iget v0, v0, Lrexsee/ebook/Page;->mContentHeight:I

    move v7, v0

    sub-int v21, v6, v7

    .restart local v21    # "y":I
    goto/16 :goto_1

    .line 108
    .end local v21    # "y":I
    :cond_6
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mRect:Landroid/graphics/Rect;

    move-object v6, v0

    move-object v0, v6

    iget v0, v0, Landroid/graphics/Rect;->top:I

    move/from16 v21, v0

    .restart local v21    # "y":I
    goto/16 :goto_1

    .line 111
    .restart local v16    # "i":I
    :cond_7
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mLines:Ljava/util/ArrayList;

    move-object v6, v0

    move-object v0, v6

    move/from16 v1, v16

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v17

    check-cast v17, Lrexsee/ebook/LineInterface;

    .line 112
    .local v17, "line":Lrexsee/ebook/LineInterface;
    new-instance v18, Landroid/graphics/Rect;

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mRect:Landroid/graphics/Rect;

    move-object v6, v0

    iget v6, v6, Landroid/graphics/Rect;->left:I

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mRect:Landroid/graphics/Rect;

    move-object v7, v0

    iget v7, v7, Landroid/graphics/Rect;->right:I

    invoke-interface/range {v17 .. v17}, Lrexsee/ebook/LineInterface;->getHeight()I

    move-result v8

    add-int v8, v8, v21

    move-object/from16 v0, v18

    move v1, v6

    move/from16 v2, v21

    move v3, v7

    move v4, v8

    invoke-direct {v0, v1, v2, v3, v4}, Landroid/graphics/Rect;-><init>(IIII)V

    .line 113
    .local v18, "r":Landroid/graphics/Rect;
    move-object/from16 v0, v17

    move-object v1, v5

    move-object/from16 v2, v18

    invoke-interface {v0, v1, v2}, Lrexsee/ebook/LineInterface;->draw(Landroid/graphics/Canvas;Landroid/graphics/Rect;)V

    .line 114
    move-object/from16 v0, v18

    iget v0, v0, Landroid/graphics/Rect;->bottom:I

    move/from16 v21, v0

    .line 110
    add-int/lit8 v16, v16, 0x1

    goto/16 :goto_2

    .line 122
    .end local v17    # "line":Lrexsee/ebook/LineInterface;
    .end local v18    # "r":Landroid/graphics/Rect;
    :cond_8
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mRect:Landroid/graphics/Rect;

    move-object v6, v0

    iget v6, v6, Landroid/graphics/Rect;->top:I

    div-int/lit8 v6, v6, 0x2

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mHeaderPaint:Landroid/graphics/Paint;

    move-object v7, v0

    invoke-virtual {v7}, Landroid/graphics/Paint;->getTextSize()F

    move-result v7

    float-to-int v7, v7

    div-int/lit8 v7, v7, 0x2

    add-int v15, v6, v7

    .restart local v15    # "hy":I
    goto/16 :goto_3

    .line 131
    .end local v15    # "hy":I
    :cond_9
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mFactory:Lrexsee/ebook/PageFactory;

    move-object v6, v0

    invoke-virtual {v6}, Lrexsee/ebook/PageFactory;->getTotal()I

    move-result v19

    .line 132
    .local v19, "total":I
    if-lez v19, :cond_a

    new-instance v6, Ljava/lang/StringBuilder;

    const-string v7, "/"

    invoke-direct {v6, v7}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move-object v0, v6

    move/from16 v1, v19

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    move-object/from16 v20, v6

    .line 133
    .local v20, "totalString":Ljava/lang/String;
    :goto_6
    new-instance v6, Ljava/lang/StringBuilder;

    move-object/from16 v0, p0

    iget v0, v0, Lrexsee/ebook/Page;->index:I

    move v7, v0

    add-int/lit8 v7, v7, 0x1

    invoke-static {v7}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v7

    invoke-direct {v6, v7}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move-object v0, v6

    move-object/from16 v1, v20

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v13

    .restart local v13    # "footer":Ljava/lang/String;
    goto/16 :goto_4

    .line 132
    .end local v13    # "footer":Ljava/lang/String;
    .end local v20    # "totalString":Ljava/lang/String;
    :cond_a
    const-string v6, ""

    move-object/from16 v20, v6

    goto :goto_6

    .line 141
    .end local v19    # "total":I
    .restart local v13    # "footer":Ljava/lang/String;
    :cond_b
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mRect:Landroid/graphics/Rect;

    move-object v6, v0

    iget v6, v6, Landroid/graphics/Rect;->bottom:I

    move-object/from16 v0, p0

    iget v0, v0, Lrexsee/ebook/Page;->mHeight:I

    move v7, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mRect:Landroid/graphics/Rect;

    move-object v8, v0

    iget v8, v8, Landroid/graphics/Rect;->bottom:I

    sub-int/2addr v7, v8

    div-int/lit8 v7, v7, 0x2

    add-int/2addr v6, v7

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/ebook/Page;->mFooterPaint:Landroid/graphics/Paint;

    move-object v7, v0

    invoke-virtual {v7}, Landroid/graphics/Paint;->getTextSize()F

    move-result v7

    float-to-int v7, v7

    div-int/lit8 v7, v7, 0x2
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    add-int/2addr v6, v7

    const/4 v7, 0x2

    sub-int v14, v6, v7

    .restart local v14    # "fy":I
    goto/16 :goto_5

    .line 147
    .end local v5    # "canvas":Landroid/graphics/Canvas;
    .end local v11    # "bitmap":Landroid/graphics/Bitmap;
    .end local v13    # "footer":Ljava/lang/String;
    .end local v14    # "fy":I
    .end local v16    # "i":I
    .end local v21    # "y":I
    :catch_0
    move-exception v6

    move-object v12, v6

    .line 148
    .local v12, "e":Ljava/lang/Exception;
    const/4 v6, 0x0

    goto/16 :goto_0
.end method

.method public getContentHeight()I
    .locals 1

    .prologue
    .line 94
    iget v0, p0, Lrexsee/ebook/Page;->mContentHeight:I

    return v0
.end method

.method public getRect()Landroid/graphics/Rect;
    .locals 1

    .prologue
    .line 91
    iget-object v0, p0, Lrexsee/ebook/Page;->mRect:Landroid/graphics/Rect;

    return-object v0
.end method

.method public isNull()Z
    .locals 1

    .prologue
    .line 88
    iget-object v0, p0, Lrexsee/ebook/Page;->mLines:Ljava/util/ArrayList;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lrexsee/ebook/Page;->mLines:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-eqz v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x1

    goto :goto_0
.end method
